﻿using System;
using System.Windows.Controls;
using System.Windows;

namespace CodeCounsel.SharePoint.RibbonDesigner.View.AttachedBehaviors
{
    class ContentControlDropManager
        : DropManager
    {
        ContentControl _contentControl;

        public ContentControlDropManager(ContentControl contentControl, IDropProcessor dropProcessor)
            : base(dropProcessor)
        {
            TargetItemContainer = contentControl;
            _contentControl = contentControl;
        }

        public override void CreateInsertionAdorner()
        {
        }

        public override void UpdateInsertionAdornerPosition()
        {
        }

        public override void RemoveInsertionAdorner()
        {
        }

        public override DragDropEffects DecideDropTarget(DependencyObject originalSource, Func<IInputElement, Point> getDropPoint)
        {
            return DragDropEffects.All;
        }

        public override void InsertDraggedItem(object draggedItem, DragManager sourceHelper, bool move, int originalIndex)
        {
            DropProcessor.PerformDrop(draggedItem, originalIndex);
        }
    }
}
